package models

import (
	"time"
)

func (BatchPromotionTemplate) TableName() string {
	return "batch_promotion_template"
}

type BatchPromotionTemplate struct {
	ID                    int64                  `gorm:"primaryKey;autoIncrement"`
	Status                int8                   `gorm:"default:1;comment:广告计划状态 0=关闭 1=开启"`
	PromotionName         string                 `gorm:"size:255;comment:广告计划名称"`
	AutoIncrementID       int                    `gorm:"default:1;comment:广告计划名称自增ID起始值 当在广告计划名称中添加自增ID动态词时生效"`
	SystemIDSuffix        int8                   `gorm:"default:0;comment:广告计划名称是否添加系统ID后缀 0=否 1=是"`
	DeliverySettings      map[string]interface{} `gorm:"type:json;comment:广告计划投放配置 (推广身份、原生锚点、投放链接等)"`
	TitlePackageIDs       map[string]interface{} `gorm:"type:json;comment:标题包ID列表"`
	TitleNum              int                    `gorm:"comment:每组创意分配标题数量"`
	TitleDistributionType string                 `gorm:"size:20;default:'RANDOM';comment:标题分配方式 RANDOM=随机, PROCEDURE=程序化"`
	MaterialSource        string                 `gorm:"size:20;default:'MEDIA';comment:素材来源 MEDIA=媒体视频库素材, AWEME=抖音号内素材"`
	VideoVerticalNum      int                    `gorm:"default:0;comment:竖版视频素材分配数量 0=不分配"`
	VideoHorizonNum       int                    `gorm:"default:0;comment:横版视频素材分配数量 0=不分配"`
	VideoMaterialIDs      map[string]interface{} `gorm:"type:json;comment:视频素材ID(video_id)列表"`
	CreatedAt             time.Time              `gorm:"default:CURRENT_TIMESTAMP;comment:创建时间"`
	UpdatedAt             time.Time              `gorm:"default:CURRENT_TIMESTAMP;comment:更新时间"`
	IsDeleted             int8                   `gorm:"default:0;comment:是否删除"`
	CompanyID             int                    `gorm:"comment:公司ID"`
	GroupID               int                    `gorm:"comment:部门ID"`
}
